<?php

include 'controlador.php';

$c = new Controller();
$con = $c->checkSession();

if(isset($_GET['ciclo']) && $_GET['ciclo'] != "")$stmt = "where ciclo = " . $_GET['ciclo'];

echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
require_once 'DataGrid_1.php';

$grid = new DataGrid_1("reporte1_detalle", '*', $con);
$grid->SetWhereClause($stmt);
$grid->SetOrderBy('order by curso asc');
$grid->SetVisiblePK(true);
//$grid->SetNameColumn(1, "CATEGORIA");
//$grid->SetTypeColumn(4, TYPE_NUMBER);
//$grid->SetCellProperty(4, "align=left width=10%");
//$grid->Show();

require_once('ReportList.php');
$oList = new ReportList();
$oList->setTitle('SAE/SAP');
$oList->setSubTitle('Horario de cursos');
//$oList->addOutputColumn('categoria_id_categoria', 'Categoria');
//$oList->addOutputColumn('nombre', 'Nombre');
//$oList->addOutputColumn('apellido', 'Apellido');
//$oList->addOutputColumn('strHomePhone', 'Home Phone', 'phone');
//$oList->addOutputColumn('strState', 'State', 'ucase', 'right');
//$oList->addOutputColumn('curAmountPaid', 'Amount Paid', 'dollars', 'right');
//$oList->allowPaging(true, $_SERVER['PHP_SELF'] . '?Base=');
//$oList->setListRange($_GET['Base'], 5);
//$oList->allowSort(true, $_GET['Sort'], $_GET['SortDescending'], 'p_listados.php');
$oList->downloadListFromArray($arrData, 'xls');
$oList->makeListFromArray($grid->GetAsArray());
//$grid->Show();
?>
